
//
// UIKeyboardType
//
// Requests that a particular keyboard type be displayed when a text widget
// becomes first responder.
// Note: Some keyboard/input methods types may not support every variant.
// In such cases, the input method will make a best effort to find a close
// match to the requested type (e.g. displaying UIKeyboardTypeNumbersAndPunctuation
// type if UIKeyboardTypeNumberPad is not supported).
//
public enum UIKeyboardType : Int {

    
    case `default` = 0 // Default type for the current input method.

    case asciiCapable = 1 // Displays a keyboard which can enter ASCII characters

    case numbersAndPunctuation = 2 // Numbers and assorted punctuation.

    case URL = 3 // A type optimized for URL entry (shows . / .com prominently).

    case numberPad = 4 // A number pad with locale-appropriate digits (0-9, ۰-۹, ०-९, etc.). Suitable for PIN entry.

    case phonePad = 5 // A phone pad (1-9, *, 0, #, with letters under the numbers).

    case namePhonePad = 6 // A type optimized for entering a person's name or phone number.

    case emailAddress = 7 // A type optimized for multiple email address entry (shows space @ . prominently).

    @available(iOS 4.1, *)
    case decimalPad = 8 // A number pad with a decimal point.

    @available(iOS 5.0, *)
    case twitter = 9 // A type optimized for twitter text entry (easy access to @ #)

    @available(iOS 7.0, *)
    case webSearch = 10 // A default keyboard type with URL-oriented addition (shows space . prominently).

    @available(iOS 10.0, *)
    case asciiCapableNumberPad = 11 // A number pad (0-9) that will always be ASCII digits.

    
    public static var alphabet: UIKeyboardType { get } // Deprecated
}

//
// UIKeyboardAppearance
//
// Requests a keyboard appearance be used when a text widget
// becomes first responder..
// Note: Some keyboard/input methods types may not support every variant.
// In such cases, the input method will make a best effort to find a close
// match to the requested type.
//
public enum UIKeyboardAppearance : Int {

    
    case `default` = 0 // Default appearance for the current input method.

    @available(iOS 7.0, *)
    case dark = 1

    @available(iOS 7.0, *)
    case light = 2

    public static var alert: UIKeyboardAppearance { get } // Deprecated
}

//
// UIReturnKeyType
//
// Controls the display of the return key.
//
// Note: This enum is under discussion and may be replaced with a
// different implementation.
//
public enum UIReturnKeyType : Int {

    
    case `default` = 0

    case go = 1

    case google = 2

    case join = 3

    case next = 4

    case route = 5

    case search = 6

    case send = 7

    case yahoo = 8

    case done = 9

    case emergencyCall = 10

    @available(iOS 9.0, *)
    case `continue` = 11
}


/// 作用是可以指定输入框的内容类型,以便系统可以分析出用户的语义.
extension UITextContentType {

    @available(iOS 10.0, *)
    public static let name: UITextContentType

    @available(iOS 10.0, *)
    public static let namePrefix: UITextContentType

    @available(iOS 10.0, *)
    public static let givenName: UITextContentType

    @available(iOS 10.0, *)
    public static let middleName: UITextContentType

    @available(iOS 10.0, *)
    public static let familyName: UITextContentType

    @available(iOS 10.0, *)
    public static let nameSuffix: UITextContentType

    @available(iOS 10.0, *)
    public static let nickname: UITextContentType

    @available(iOS 10.0, *)
    public static let jobTitle: UITextContentType

    @available(iOS 10.0, *)
    public static let organizationName: UITextContentType

    @available(iOS 10.0, *)
    public static let location: UITextContentType

    @available(iOS 10.0, *)
    public static let fullStreetAddress: UITextContentType

    @available(iOS 10.0, *)
    public static let streetAddressLine1: UITextContentType

    @available(iOS 10.0, *)
    public static let streetAddressLine2: UITextContentType

    @available(iOS 10.0, *)
    public static let addressCity: UITextContentType

    @available(iOS 10.0, *)
    public static let addressState: UITextContentType

    @available(iOS 10.0, *)
    public static let addressCityAndState: UITextContentType

    @available(iOS 10.0, *)
    public static let sublocality: UITextContentType

    @available(iOS 10.0, *)
    public static let countryName: UITextContentType

    @available(iOS 10.0, *)
    public static let postalCode: UITextContentType

    @available(iOS 10.0, *)
    public static let telephoneNumber: UITextContentType

    @available(iOS 10.0, *)
    public static let emailAddress: UITextContentType

    @available(iOS 10.0, *)
    public static let URL: UITextContentType

    @available(iOS 10.0, *)
    public static let creditCardNumber: UITextContentType

    @available(iOS 11.0, *)
    public static let username: UITextContentType

    @available(iOS 11.0, *)
    public static let password: UITextContentType

    @available(iOS 12.0, *)
    public static let newPassword: UITextContentType

    @available(iOS 12.0, *)
    public static let oneTimeCode: UITextContentType

    
    /// Parcel tracking numbers such as "FedEx 8602 9191 3550", "1Z50T0536891664106", and "729445720428778".
    @available(iOS 15.0, *)
    public static let shipmentTrackingNumber: UITextContentType

    
    /// Airline flight numbers such as "CZ # 1234", "AA212", and "SW Flight 573".
    @available(iOS 15.0, *)
    public static let flightNumber: UITextContentType

    
    /// Dates, times, or durations such as "7-3-2021" or "This Saturday", "12:30", and "10-11am", respectively.
    @available(iOS 15.0, *)
    public static let dateTime: UITextContentType
}
